package pack0630.cn;
//成员内部类以前加上static关键词就为静态内部类
//静态内部类
public class Outer1 {
    static String name="张无忌";

    public static void sing(){
        System.out.println("唱歌");
    }
    public static void eat(){
        Inner.eat();
    }
    public static class Inner {
        public static void eat() {
            System.out.println("eat,,,");
            System.out.println(name);  //内部类访问外部类
            Outer1.sing();    //内部类访问外部类
        }
    }

    public static void main(String[] args) {
        Outer1 ou=new Outer1();
        Inner.eat();  //外部访问内部的


    }

}
